package IntelIpps

type IComputingInterface interface {
	// 向量
	SortFloat(in []float32, ascend bool) []float32
	NormalizeFloat(in []float32, sub, div float32) []float32
	DotProductFloat(a, b []float32) float32
	MulCFloat(in []float32, c float32) []float32
	MulFloat(a, b []float32) []float32
	AddFloat(a, b []float32) []float32
	SubFloat(a, b []float32) []float32
	SumFloat(in []float32, hint HintAlgorithm) float32
	NormInfFloat(in []float32) float32
	MaxFloat(in []float32) float32
	MinFloat(in []float32) float32
	MeanFloat(in []float32) float32

	// FFT
	FFTInitFloat(length int) error
	FFTFloat(real, imag []float32) []float32
	FFTFreeFloat()

	// FIR
	FIRInitFloat(coeffs []float32, algType AlgType) error
	FIRFloat(src []float32) []float32
	FIRFreeFloat()

	// 重采样
	ResampleInit(inRate, outRate int)
	Resample(src []float32, norm float32) ([]float32, int)
	ResampleFree()

	// 其他
	FilterMedian(src []float32, maskSize int) []float32
	Threshold(src []float32, level, value float32) []float32
	CartToPolar(x, y []float32) (magn, phase []float32)
	Flip(src []float32) []float32
}

type HintAlgorithm int

const (
	HintFast     HintAlgorithm = 0
	HintAccurate HintAlgorithm = 1
)

type AlgType int

const (
	AlgAuto AlgType = 0
	AlgFFT  AlgType = 1
)
